<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>home</title>
  <!-- 引入 layui.css -->
  <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">
  <script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo layui-hide-xs layui-bg-black">AAA-chat-admin后台管理</div>

    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item layui-hide layui-show-md-inline-block">
        <a href="javascript:;">
          <img src="${user.head_image_thumb}" class="layui-nav-img">
          ${user.user_name}
        </a>
        <dl class="layui-nav-child">
          <dd><a href="user?request_type=logout">注销</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
        <a href="javascript:;">
          <i class="layui-icon layui-icon-more-vertical"></i>
        </a>
      </li>
    </ul>
  </div>

  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree" lay-filter="test">
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;">用户管理</a>
          <dl class="layui-nav-child">
            <dd><a href="user?request_type=findAll">用户管理</a></dd>
            <dd><a href="javascript:;">好友管理</a></dd>
            <dd><a href="javascript:;">群聊管理</a></dd>
            <dd><a href="javascript:;">消息管理</a></dd>
          </dl>
        </li>
      </ul>
    </div>
  </div>

  <div class="layui-body">
    <iframe id="iframeMain"  style="width: 100%;height: 100%" ></iframe>
  </div>

  <div class="layui-footer">
    <!-- 底部固定区域 -->
    底部固定区域
  </div>
</div>
<script>
  //JS
  layui.use(['element', 'layer', 'util'], function(){
    var element = layui.element
            ,layer = layui.layer
            ,util = layui.util
            ,$ = layui.$;

    $(function () {
      //页面加载之后执行的代码
      //点击a标签的时候，修改iframe的src属性
      $("dd>a").click(function (e) {
        //阻断超链接的跳转事件
        e.preventDefault();
        //取得超链接对象的href属性值赋给iframe的src属性
        $("#iframeMain").attr("src",$(this).attr("href"));
      })
    })

  });
</script>
</body>
</html>
